#pragma once

#ifndef DARIO
#include "DateTimeManager.h"
#include "Vectors.h"

typedef STL::map<int, IntVec> CalendarType;

struct CalendarData
{
	explicit CalendarData(const uint i_startingYear = 0, const uint i_startingFirstSunday = 0, 
		const uint i_currentYearDelta = 0, const uint i_currentFirstSunday = 0, const uint i_currentDay = 0)
	:m_startingYear(i_startingYear)
	,m_startingFirstSunday(i_startingFirstSunday)
	,m_currentYearDelta(i_currentYearDelta)
	,m_currentFirstSunday(i_currentFirstSunday)
	,m_currentDay(i_currentDay)
	{
	}

	uint m_startingYear;
	uint m_startingFirstSunday;
	uint m_currentYearDelta;
	uint m_currentFirstSunday;
	uint m_currentDay;
};

class Calendar
{
public:
	Calendar(){}
	void Initialize(){}
	void SetData(const CalendarData& i_data){m_calendarData = i_data;}

	uint GetCurrentMonth() const
	{
		return GetMonthOfDay(m_calendarData.m_currentDay, GetCurrentYear());
	}

	uint GetCurrentYear() const
	{
		return m_calendarData.m_startingYear + m_calendarData.m_currentYearDelta;
	}

	uint GetCurrentDayOfTheWeek() const
	{
		return GetDayOfTheWeek(m_calendarData.m_currentDay, m_calendarData.m_currentFirstSunday);
	}

	void Advance(const uint i_numDays)
	{
		//todo
	}

private:
	CalendarData m_calendarData;
	CalendarType m_calendarType;
};
#endif
